<%--
  Created by IntelliJ IDEA.
  User: FT
  Date: 2020/9/26
  Time: 10:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>会议详情</title>
    <style>
        label {
            margin-top: 2%;
            margin-left: 10%;
            display: inline-block;
            width: 70px;
        }
        #btn{
            height: 30px;
            width: 60px;
            background-color: antiquewhite;
            border: none;
            margin-top: 2%;
            margin-left: 10%;
        }
        #btn_cacel{
            height: 30px;
            width: 60px;
            background-color: burlywood;
            border: none;
            margin-top: 2%;
            margin-left: 10%;
        }
        span{
            height: 30px;
            width: 100px;
            border: 1px black solid;
            text-align: center;
            line-height: 30px;
            display: inline-block;
            background-color: darkgray;
            margin-top: 2%;
            margin-left: 10%;
        }
    </style>
</head>
<body>
<jsp:include page="/html/commons/top.jsp"></jsp:include>
<jsp:include page="/html/commons/menu.jsp"></jsp:include>
<div id="right">
    <%--${joinMeeting}--%>
    <c:choose>
        <c:when test="${fn:contains(meetingDetail.makeUser,loginUser.id)&&meetingDetail.status=='1'&&joinMeeting==0}">
            <button id="btn" onclick="location.href='${pageContext.request.contextPath}/meeting/joinMeeting?uid=${loginUser.id}&mid=${meetingDetail.id}'">参加</button><br>
        </c:when>
        <c:when test="${fn:contains(meetingDetail.makeUser,loginUser.id)&&meetingDetail.status=='1'&&joinMeeting>0}">
            <button id="btn_cacel" onclick="location.href='${pageContext.request.contextPath}/meeting/cancelJoinMeeting?uid=${loginUser.id}&mid=${meetingDetail.id}'">取消</button><br>
        </c:when>
        <c:when test="${fn:contains(meetingDetail.makeUser,loginUser.id)&&meetingDetail.status=='2'&&joinMeeting==0}">
            <span>会议缺席</span><br>
        </c:when>
        <c:when test="${fn:contains(meetingDetail.makeUser,loginUser.id)&&meetingDetail.status=='2'&&joinMeeting>0}">
            <span>已参加会议</span><br>
        </c:when>
        <c:when test="${fn:contains(meetingDetail.makeUser,loginUser.id)&&meetingDetail.status=='0'&&joinMeeting>0}">
            <span>会议尚未开始</span><br>
        </c:when>
        <c:otherwise>
            <span>无需参与会议</span><br>
        </c:otherwise>
    </c:choose>
    <label>会议主题:</label>${meetingDetail.title}<br>
    <label>会议状态:</label>
        <c:choose>
            <c:when test="${meetingDetail.status=='0'}">
                未开始
            </c:when>
            <c:when test="${meetingDetail.status=='1'}">
                进行中
            </c:when>
            <c:otherwise>
                已结束
            </c:otherwise>
        </c:choose><br>
    <label>所属部门:</label>${meetingDetail.deptName}<br>
    <label>应到人数:</label>${needMeetingCount}<br>
    <label>参与人数:</label>${joinMeetinngCount}<br>
    <label>缺勤人数:</label>${needMeetingCount-joinMeetinngCount}<br>
    <label>会议内容:</label>${meetingDetail.content}<br>
    <label>开始时间:</label>${meetingDetail.startTime}<br>
    <label>结束时间:</label>${meetingDetail.endTime}<br>
</div>
</body>
</html>
